package com.unionpay.mobile.android.pboctransaction.samsung;

import android.content.Context;
import android.content.Intent;
import com.unionpay.client3.tsm.ITsmConnection;
import com.unionpay.mobile.android.pboctransaction.c;
import com.unionpay.mobile.android.pboctransaction.e;
import com.unionpay.mobile.android.utils.h;

public final class a
  implements c
{
  private Context a;
  private com.unionpay.mobile.android.pboctransaction.b b;
  private ITsmConnection c;
  private int d = 0;

  private void a(boolean paramBoolean)
  {
    if (this.b != null)
    {
      if (paramBoolean)
        this.b.a();
    }
    else
      return;
    this.b.b();
  }

  // ERROR //
  public final java.util.ArrayList<com.unionpay.mobile.android.model.c> a(com.unionpay.mobile.android.pboctransaction.d paramd)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 23	com/unionpay/mobile/android/pboctransaction/samsung/a:c	Lcom/unionpay/client3/tsm/ITsmConnection;
    //   4: astore_2
    //   5: aconst_null
    //   6: astore_3
    //   7: aload_2
    //   8: ifnull +153 -> 161
    //   11: aload_0
    //   12: getfield 23	com/unionpay/mobile/android/pboctransaction/samsung/a:c	Lcom/unionpay/client3/tsm/ITsmConnection;
    //   15: aload_0
    //   16: getfield 20	com/unionpay/mobile/android/pboctransaction/samsung/a:d	I
    //   19: invokeinterface 46 2 0
    //   24: astore 6
    //   26: aconst_null
    //   27: astore_3
    //   28: aload 6
    //   30: ifnull +131 -> 161
    //   33: aload 6
    //   35: arraylength
    //   36: istore 7
    //   38: aconst_null
    //   39: astore_3
    //   40: iload 7
    //   42: ifle +119 -> 161
    //   45: new 48	java/util/ArrayList
    //   48: dup
    //   49: invokespecial 49	java/util/ArrayList:<init>	()V
    //   52: astore 8
    //   54: iconst_0
    //   55: istore 9
    //   57: iload 9
    //   59: aload 6
    //   61: arraylength
    //   62: if_icmpge +140 -> 202
    //   65: aload 6
    //   67: iload 9
    //   69: aaload
    //   70: invokevirtual 55	com/unionpay/client3/tsm/SeAppInfo:getAppAid	()Ljava/lang/String;
    //   73: astore 12
    //   75: aload 12
    //   77: ifnull +119 -> 196
    //   80: aload 12
    //   82: invokevirtual 61	java/lang/String:length	()I
    //   85: bipush 16
    //   87: if_icmple +109 -> 196
    //   90: ldc 63
    //   92: aload 12
    //   94: bipush 14
    //   96: bipush 16
    //   98: invokevirtual 67	java/lang/String:substring	(II)Ljava/lang/String;
    //   101: invokevirtual 71	java/lang/String:equalsIgnoreCase	(Ljava/lang/String;)Z
    //   104: ifne +92 -> 196
    //   107: iconst_0
    //   108: istore 13
    //   110: iload 13
    //   112: ifne +36 -> 148
    //   115: aload 8
    //   117: new 73	com/unionpay/mobile/android/model/a
    //   120: dup
    //   121: iconst_1
    //   122: aload 6
    //   124: iload 9
    //   126: aaload
    //   127: invokevirtual 55	com/unionpay/client3/tsm/SeAppInfo:getAppAid	()Ljava/lang/String;
    //   130: ldc 75
    //   132: aload 6
    //   134: iload 9
    //   136: aaload
    //   137: invokevirtual 78	com/unionpay/client3/tsm/SeAppInfo:getPan	()Ljava/lang/String;
    //   140: iconst_1
    //   141: invokespecial 81	com/unionpay/mobile/android/model/a:<init>	(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V
    //   144: invokevirtual 85	java/util/ArrayList:add	(Ljava/lang/Object;)Z
    //   147: pop
    //   148: iinc 9 1
    //   151: goto -94 -> 57
    //   154: astore 5
    //   156: aload 5
    //   158: invokevirtual 88	android/os/RemoteException:printStackTrace	()V
    //   161: aload_3
    //   162: areturn
    //   163: astore 4
    //   165: aload 4
    //   167: invokevirtual 89	java/lang/Exception:printStackTrace	()V
    //   170: aload_3
    //   171: areturn
    //   172: astore 11
    //   174: aload 11
    //   176: astore 4
    //   178: aload 8
    //   180: astore_3
    //   181: goto -16 -> 165
    //   184: astore 10
    //   186: aload 10
    //   188: astore 5
    //   190: aload 8
    //   192: astore_3
    //   193: goto -37 -> 156
    //   196: iconst_1
    //   197: istore 13
    //   199: goto -89 -> 110
    //   202: aload 8
    //   204: areturn
    //
    // Exception table:
    //   from	to	target	type
    //   11	26	154	android/os/RemoteException
    //   33	38	154	android/os/RemoteException
    //   45	54	154	android/os/RemoteException
    //   11	26	163	java/lang/Exception
    //   33	38	163	java/lang/Exception
    //   45	54	163	java/lang/Exception
    //   57	75	172	java/lang/Exception
    //   80	107	172	java/lang/Exception
    //   115	148	172	java/lang/Exception
    //   57	75	184	android/os/RemoteException
    //   80	107	184	android/os/RemoteException
    //   115	148	184	android/os/RemoteException
  }

  public final void a()
  {
  }

  public final void a(com.unionpay.mobile.android.pboctransaction.b paramb, Context paramContext)
  {
    this.b = paramb;
    this.a = paramContext;
    Intent localIntent = new Intent();
    localIntent.setAction("com.unionpay.client3.action.TSM_MODEL");
    localIntent.setPackage("com.unionpay");
    paramContext.startService(localIntent);
    if (!paramContext.bindService(localIntent, new b(this), 1))
    {
      h.a("plugin-clientV3", "startSamsungService() failed!!!");
      a(false);
    }
  }

  public final byte[] a(byte[] paramArrayOfByte, int paramInt)
  {
    ITsmConnection localITsmConnection = this.c;
    Object localObject = null;
    if (localITsmConnection != null);
    try
    {
      h.a("plugin-clientV3", "--->" + e.a(paramArrayOfByte));
      String str = this.c.sendApdu(this.d, e.a(paramArrayOfByte), paramInt);
      h.a("plugin-clientV3", "<---" + str);
      byte[] arrayOfByte = e.a(str);
      localObject = arrayOfByte;
      return localObject;
    }
    catch (Exception localException)
    {
      localException.printStackTrace();
    }
    return null;
  }

  public final void b()
  {
  }

  public final void c()
  {
  }

  public final void d()
  {
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.unionpay.mobile.android.pboctransaction.samsung.a
 * JD-Core Version:    0.6.2
 */